open(BUFF,"/data4/bsi/bioinf_int/s106381.borawork/naresh_scripts/SVN/tcga_dataprocess_boraworkflow/bin/GenomeWideSNP_6.na30.annot.csv") or die "no file found\n";
while(<BUFF>)
{
	chomp($_);
	if($_ !~ m/^#/)
	{
		$_ =~ s/"//g;
		@array=split(",",$_);
		$hash{$array[0]}=$array[1];
		#print $array[0]."\t".$array[1]."\n";
	}
}
open(BUFF,"AFFY_final.tped");
open(WRBUFF,">AFFY_final_rsid.tped");
while(<BUFF>)
{
	chomp($_);
	@array=split(" ",$_);
	if(exists($hash{$array[1]}))
	{
		$array[1] = $hash{$array[1]};
		$_ = join(" ",@array);
	}
	print WRBUFF $_."\n";
}
